package com.dragonboat.repository;

import com.dragonboat.entity.Team;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface TeamRepository extends JpaRepository<Team, Integer> {
    Optional<Team> findByTeamName(String teamName);
    Optional<Team> findById(Integer teamId);

    // 添加这个方法
    boolean existsByTeamName(String teamName);
}